\(\int \frac {(a+b \sqrt {x})^p}{x^2} \, dx\) [2269]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [F]
   Sympy [C] (verification not implemented)
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 15, antiderivative size = 46 \[ \int \frac {\left (a+b \sqrt {x}\right )^p}{x^2} \, dx=-\frac {2 b^2 \left (a+b \sqrt {x}\right )^{1+p} \operatorname {Hypergeometric2F1}\left (3,1+p,2+p,1+\frac {b \sqrt {x}}{a}\right )}{a^3 (1+p)} \]

[Out]

-2*b^2*hypergeom([3, p+1],[2+p],1+b*x^(1/2)/a)*(a+b*x^(1/2))^(p+1)/a^3/(p+1)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {272, 67} \[ \int \frac {\left (a+b \sqrt {x}\right )^p}{x^2} \, dx=-\frac {2 b^2 \left (a+b \sqrt {x}\right )^{p+1} \operatorname {Hypergeometric2F1}\left (3,p+1,p+2,\frac {\sqrt {x} b}{a}+1\right )}{a^3 (p+1)} \]

[In]

Int[(a + b*Sqrt[x])^p/x^2,x]

[Out]

(-2*b^2*(a + b*Sqrt[x])^(1 + p)*Hypergeometric2F1[3, 1 + p, 2 + p, 1 + (b*Sqrt[x])/a])/(a^3*(1 + p))

Rule 67

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))
*Hypergeometric2F1[-m, n + 1, n + 2, 1 + d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Intege
rQ[m] || GtQ[-d/(b*c), 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rubi steps \begin{align*} \text {integral}& = 2 \text {Subst}\left (\int \frac {(a+b x)^p}{x^3} \, dx,x,\sqrt {x}\right ) \\ & = -\frac {2 b^2 \left (a+b \sqrt {x}\right )^{1+p} \, _2F_1\left (3,1+p;2+p;1+\frac {b \sqrt {x}}{a}\right )}{a^3 (1+p)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00 \[ \int \frac {\left (a+b \sqrt {x}\right )^p}{x^2} \, dx=-\frac {2 b^2 \left (a+b \sqrt {x}\right )^{1+p} \operatorname {Hypergeometric2F1}\left (3,1+p,2+p,1+\frac {b \sqrt {x}}{a}\right )}{a^3 (1+p)} \]

[In]

Integrate[(a + b*Sqrt[x])^p/x^2,x]

[Out]

(-2*b^2*(a + b*Sqrt[x])^(1 + p)*Hypergeometric2F1[3, 1 + p, 2 + p, 1 + (b*Sqrt[x])/a])/(a^3*(1 + p))

Maple [F]

\[\int \frac {\left (a +b \sqrt {x}\right )^{p}}{x^{2}}d x\]

[In]

int((a+b*x^(1/2))^p/x^2,x)

[Out]

int((a+b*x^(1/2))^p/x^2,x)

Fricas [F]

\[ \int \frac {\left (a+b \sqrt {x}\right )^p}{x^2} \, dx=\int { \frac {{\left (b \sqrt {x} + a\right )}^{p}}{x^{2}} \,d x } \]

[In]

integrate((a+b*x^(1/2))^p/x^2,x, algorithm="fricas")

[Out]

integral((b*sqrt(x) + a)^p/x^2, x)

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 3.02 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.91 \[ \int \frac {\left (a+b \sqrt {x}\right )^p}{x^2} \, dx=- \frac {2 b^{p} x^{\frac {p}{2} - 1} \Gamma \left (2 - p\right ) {{}_{2}F_{1}\left (\begin {matrix} - p, 2 - p \\ 3 - p \end {matrix}\middle | {\frac {a e^{i \pi }}{b \sqrt {x}}} \right )}}{\Gamma \left (3 - p\right )} \]

[In]

integrate((a+b*x**(1/2))**p/x**2,x)

[Out]

-2*b**p*x**(p/2 - 1)*gamma(2 - p)*hyper((-p, 2 - p), (3 - p,), a*exp_polar(I*pi)/(b*sqrt(x)))/gamma(3 - p)

Maxima [F]

\[ \int \frac {\left (a+b \sqrt {x}\right )^p}{x^2} \, dx=\int { \frac {{\left (b \sqrt {x} + a\right )}^{p}}{x^{2}} \,d x } \]

[In]

integrate((a+b*x^(1/2))^p/x^2,x, algorithm="maxima")

[Out]

integrate((b*sqrt(x) + a)^p/x^2, x)

Giac [F]

\[ \int \frac {\left (a+b \sqrt {x}\right )^p}{x^2} \, dx=\int { \frac {{\left (b \sqrt {x} + a\right )}^{p}}{x^{2}} \,d x } \]

[In]

integrate((a+b*x^(1/2))^p/x^2,x, algorithm="giac")

[Out]

integrate((b*sqrt(x) + a)^p/x^2, x)

Mupad [F(-1)]

Timed out. \[ \int \frac {\left (a+b \sqrt {x}\right )^p}{x^2} \, dx=\int \frac {{\left (a+b\,\sqrt {x}\right )}^p}{x^2} \,d x \]

[In]

int((a + b*x^(1/2))^p/x^2,x)

[Out]

int((a + b*x^(1/2))^p/x^2, x)